import { RouteRecordRaw } from 'vue-router';
import { Layout } from '@/router/constant';
import { IconCommon } from '@arco-design/web-vue/es/icon';
import { renderIcon } from '@/utils';

const routes: Array<RouteRecordRaw> = [
  {
    path: '/comtemp',
    name: 'Comtemp',
    component: Layout,
    redirect: '/comtemp/search-article',
    meta: {
      title: '常用模板',
      icon: renderIcon(IconCommon),
      sort: 10,
    },
    children: [
      {
        path: 'search-article',
        name: 'SearchArticle',
        meta: {
          title: '搜索列表(文章)',
        },
        component: () => import('@/views/comtemp/search-article/search-article.vue'),
      },
      {
        path: 'search-video',
        name: 'SearchVideo',
        meta: {
          title: '搜索列表(视频)',
        },
        component: () => import('@/views/comtemp/search-video/search-video.vue'),
      },
      {
        path: 'search-make',
        name: 'SearchMake',
        meta: {
          title: '搜索列表(预约)',
        },
        component: () => import('@/views/comtemp/search-make/search-make.vue'),
      },
    ],
  },
];

export default routes;
